From the Firehose

ZSH terminal

Install zsh

  1. Install zsh in Arch Linux
sudo pacman -S zsh
  1. Set Zsh as default shell
chsh -s /usr/bin/zsh
# or
sudo chsh -s $(which zsh)
  1. Log out and then login again to your terminal to use the new Zsh shell.
echo $SHELL
/usr/bin/zsh
  1. Install oh-my-zsh using curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  1. Use agnoster zsh theme

Edit the ~/.zshrc file, edit this following line

ZSH_THEME="robbyrussell"

Into

ZSH_THEME="agnoster" # (this is one of the fancy ones)
# see https://github.com/ohmyzsh/ohmyzsh/wiki/Themes#agnoster

Save the file, and then open a new terminal to see the changes that we did

  1. Install powerlevel10k for Oh my zsh

Run this following command :

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Now, edit the ZSH_THEME in ~/.zshrc file into :

ZSH_THEME="powerlevel10k/powerlevel10k"

Open a new terminal, and you should see the powerlevel10k theme has applied. If the p10k configuration wizard does not start automatically, you can run the configuration wizard the powerlevel10k theme with this command :

p10k configure

After you run the command above, p10k will prompt some questions, and you can choose the answer based on your personal preferences.

  1. Install plugins (zsh-autosuggestions and zsh-syntax-highlighting)

Download zsh-autosuggestions :

git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions 

Download zsh-syntax-higlighting :

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

Edit ~/.zshrc file, find plugins=(git) replace plugins=(git) with :

plugins=(git zsh-autosuggestions zsh-syntax-highlighting)

Reopen your terminal, now you should be able to use the auto suggestions and syntax highlighting.

Category: Linux | Comments: 0

Comments: 0

About

Customize this section to tell your visitors a little bit about your publication, writers, content, or something else entirely. Totally up to you.